import { get, post } from '@/utils/service'

/**
 * 新增设备分组
 */
export function addDeviceGroup(params) {
  return post('/deviceManage/deviceGroup/addDeviceGroup', params)
}

/**
 * 编辑单个设备分组
 */
export function editDeviceGroup(params) {
  return post('/deviceManage/deviceGroup/editDeviceGroup', params)
}

/**
 * 查询设备分组
 */
export function getDeviceGroupList(params) {
  return get('/deviceManage/deviceGroup/getDeviceGroupList', params)
}

/**
 * 删除设备分组信息
 */
export function delDeviceGroup(params) {
  return get('/deviceManage/deviceGroup/delDeviceGroup', params)
}

/**
 * 查询设备列表
 */
export function getDeviceList(params) {
  return get('/deviceManage/device/getDeviceList', params)
}

/**
 * 新增单个设备
 */
export function addDevice(params) {
  return post('/deviceManage/device/addDevice', params)
}

/**
 * 编辑单个设备
 */
export function editDeviceById(params) {
  return post('/deviceManage/device/editDeviceById', params)
}

/**
 * 删除设备
 */
export function delDeviceById(params) {
  return get('/deviceManage/device/delDeviceById', params)
}

/**
 * 下发设备指令
 */
export function addSendCommand(params) {
  return get('/deviceManage/device/addSendCommand', params)
}

/**
 * 编辑设备版本
 */
export function editDeviceCommandById(params) {
  return get('/deviceManage/device/editDeviceCommandById', params)
}

/**
 * 查询设备详情
 */
export function getDeviceDetailsById(params) {
  return get('/deviceManage/device/getDeviceDetailsById', params)
}

/**
 * 查询设备指令集
 */
export function getDeviceCommandById(params) {
  return get('/deviceManage/device/getDeviceCommandById', params)
}

/**
 * 舵机RK3588 PWM输出和关闭方法
 */
export function steersMan(params) {
  return post('/versionManage/deviceApp/steersMan', undefined, { params })
}

/**
 * 舵机RK3588 PWM控制方法
 */
export function control(params) {
  return post('/versionManage/deviceApp/control', undefined, { params })
}
